1. Field of the Invention
The present invention relates to an image processing apparatus, image processing method, and storage medium and, more particularly, to a technique for extracting an object region from an image including a background region and the object region.
2. Description of the Related Art
Conventionally, an object extraction technique (to be also referred to as a segmentation technique hereinafter) in an image has been studied, and is applied for the purpose of image composition, refocusing of an object, and the like in video editing processing. An object will also be referred to as a foreground hereinafter, and object extraction will also be referred to as foreground/background separation hereinafter.
As the object extraction technique, a background difference method and chromakey method are well known. In the background difference method, an image including only a background without any object is captured in advance, and an image including an object and the image including only the background and without the object are compared to calculate a difference, thereby extracting the object. The chromakey method is a standard method used in the movie industry field. In this method, a background region of a given color is set, and an object is extracted under the assumption that colors of the object do not include the background color.
However, the background difference method and chromakey method are used in only environments in which easy background control is allowed, and when an object includes a color part close to the background color, an object region is readily erroneously determined as a background region.
In recent years, as an object extraction method which does not require any specific background, a method of manually designating rough information including an object region in an image, and separating an object from an image having an arbitrary background has been proposed (ROTHER et al., Grabcut—Interactive foreground extraction using iterated graph cuts, ACM Trans. Graph., vol. 23, No. 3, 2004, pp. 309-314). The method described in ROTHER et al. (to be referred to as grabcut processing hereinafter) obtains a global maximum likelihood solution based on minimization of an energy function. Also, since manual designation is easy, this method receives a lot of attention in the segmentation study field.
However, when the grabcut processing method described in ROTHER et al. is used, a part of a background may be erroneously extracted as an object (i.e. foreground).